class CreateOrder < ActiveRecord::Migration
  def change
    create_table :orders do |t|
      t.integer :demand_id
      t.integer :buyer
      t.integer :seller
      t.string :buyer_content
      t.string :seller_content
      t.string :status, null: false, limit: 1

      t.timestamps null: false
    end

    add_index :orders, :buyer
    add_index :orders, :seller
    add_index :orders, :status
  end
end
